from csv import excel

from module_questions.customer_combine import *
from module_questions.standard_questions import *
from module_questions.standard_combine import *
from module_questions.customer_questions import *
from module_questions.customer_combine import *
from hr.hr_geturlcollection import *
from hr.hr_get_report import *
from hr.hr_payinvoice import *
from login.LoginFunc import *
from hr.hr_get_report import *
from hr.hr_audituserdemo import *

from monitor.monitor_surveys import *
from access_control.access_control import *
from sms.sms import *
from flask import g
import flask_excel as excel
#
# 具体业务
# g_ret['code'] = 400  # 返回码 200
# g_ret['msg'] = '处理失败'  # 中文标志 处理成功
# g_ret['msg_flag'] = 'error'  # 英文标志 ok
# g_ret['data'] = []  # 数据列表
# g_ret['total_count'] = 0  # 总行数
# g_ret['total_page'] = 0  # 总页数
# g_ret['count'] = 0  # 当前页行数
# g_ret['page'] = 0  # 当前第几页
# g_ret['pagesize'] = 0  # 每页大小

# app = Flask(__name__)
# app.config.update(
#     DEBUG=True,
#     # MONGO_URI='mongodb://10.200.187.131:27017/test',
#     MONGO_DBNAME='test',
#     MONGO_HOST='10.200.187.131',
#     MONGO_PORT=27017,
#
#     MONGO2_DBNAME='ir',
#     MONGO2_HOST='127.0.0.1',
#     MONGO2_PORT=27017
#
#     # MONGO_USERNAME='username',
#     # MONGO_PASSWORD='password'
# )
#
# app.wsgi_app = LighttpdCGIRootFix(app.wsgi_app)
# mongo = PyMongo(app, config_prefix='MONGO')
# mongo2 = PyMongo(app, config_prefix='MONGO2')

app_flask = app


# @app.route("/upsert_company", methods=['GET', 'POST'])
# @allow_cross_domain
# def upsert_company():
#     param = json.loads(request.data.decode('utf-8'))
#     print(param)
#     ret = LoginFunc.upsert_company(param)
#     return json.dumps(ret)

# if __name__ == "__main__":
# opts, args = getopt.getopt(sys.argv[1:], "hc:p:")
# port = 8088
# for opt, value in opts:
#     if opt == '-c':
#         print('选项c:', value)
#     elif opt == '-p':
#         port = value
#     else:
#         pass
# app.run(host='0.0.0.0')

# app.run(host='0.0.0.0', port=int(port))
